package StudyCode.summary.myfile;

import java.io.*;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CopyFileWithBufferedReaderAndBufferedWriter {
	public static void main(String[] args) throws IOException {
		try (BufferedReader inputStream = new BufferedReader(new FileReader("E:\\迅雷下载\\test1.txt"));
		     BufferedWriter outputStream = new BufferedWriter(new FileWriter("E:\\Copy\\test1.txt"))) {
			int c;
			while ((c = inputStream.read()) != -1) {
				outputStream.write(c);
			}
			System.out.println("复制成功。");
		}
	}
}
